Storage network element discovery method and apparatus

ABSTRACT

A storage network element discovery method and an apparatus, where the method includes broadcasting or multicasting, by a control network element, a heartbeat message to at least one storage network element, where the heartbeat message includes address information of the control network element, receiving, by the control network element, a response message returned by at least one storage network element according to the heartbeat message, and determining an accessible storage network element according to the response message, where the response message includes network parameter information of the corresponding storage network element. Therefore, in a storage array, by broadcasting or multicasting a heartbeat message and according to a reply from a storage network element, a control network element may determine a storage network element that can be accessed by the control network element.

CROSS-REFERENCE TO RELATED APPLICATION

This application is a continuation of International Patent ApplicationNo. PCT/CN2016/080631 filed on Apr. 29, 2016, which is herebyincorporated by reference in its entirety.

TECHNICAL FIELD

The present disclosure relates to network technologies, and inparticular, to a storage network element discovery method and anapparatus.

BACKGROUND

During conventional use of Nonvolatile Memory express (NVMe), an NVMestorage device is tightly coupled to a control network element using aPeripheral Component Interconnect Express (PCIe) bus. A device connectedto the PCIe bus may be directly discovered by a system when the systemis powered on, and may be used immediately after being initialized.

In some other approaches, after an NVMe over fabric (NOF) technologyemerges, use of the NVMe is extended from a system to a network. As aresult, an initialized control network element cannot accurately sensean accessible NVMe storage device.

SUMMARY

Embodiments of the present disclosure provide a storage network elementdiscovery method and an apparatus in order to resolve a problem in NOFtechnology that an initialized control network element cannot accuratelysense an accessible NVMe storage device.

A first aspect of the embodiments of the present disclosure provides astorage network element discovery method, where the method is applied toa storage array, the storage array includes at least one control networkelement and at least one storage network element, each storage networkelement includes at least one storage medium, the storage networkelement is connected to the storage medium using a NVMe interface, andthe method includes broadcasting or multicasting, by the control networkelement, a heartbeat message to at least one storage network element,where the heartbeat message includes address information of the controlnetwork element, receiving, by the control network element, a responsemessage returned by at least one storage network element according tothe heartbeat message, and determining, according to the responsemessage, that the at least one storage network element is an accessiblestorage network element, where the response message includes networkparameter information of the corresponding storage network element,where the network parameter information includes network addressinformation of the storage network element and address information ofthe storage medium, where the address information of the storage mediumis obtained by the storage network element using the NVMe interfacebetween the storage network element and the storage medium. The addressinformation of the storage medium may be address information of at leastone storage medium in the storage network element that returns theresponse message.

Optionally, the network parameter information may further include typeinformation of the storage network element, a namespace of the storagemedium, or the like.

Optionally, broadcasting or multicasting, by the control networkelement, a heartbeat message to at least one storage network elementincludes periodically broadcasting or multicasting, by the controlnetwork element, the heartbeat message to the at least one storagenetwork element, and after receiving, by the control network element, aresponse message returned by at least one storage network elementaccording to the heartbeat message, the method further includesperiodically receiving, by the control network element, a responsemessage returned by the at least one storage network element.

Further, after receiving, by the control network element, a responsemessage returned by at least one storage network element according tothe heartbeat message, the method further includes determining, by thecontrol network element, that a link to the first accessible storagenetwork element is disconnected if the control network element does notreceive, within a preset period of time, a response message returned bya first accessible storage network element, where the first accessiblestorage network element is any storage network element in the at leastone storage network element.

The control network element considers that the link to the firstaccessible storage network element is disconnected. Usually, the linkmay be broken, a hot swap may occur, or the like.

Optionally, if the network parameter information returned by a firstaccessible storage network element includes link status information,after receiving, by the control network element, a response messagereturned by at least one storage network element according to theheartbeat message, the method further includes determining, by thecontrol network element, a link status of the first accessible storagenetwork element according to the link status information, where thefirst accessible storage network element is any storage network elementin the at least one storage network element.

The link status information indicates that a link status changes, andthe control network element may learn, according to the link statusinformation, that the link status changes. In this case, the controlnetwork element usually considers that a link or links to one or morestorage media in the storage network element is or are disconnected.

Based on the foregoing description, determining, by the control networkelement, a link status of the first accessible storage network elementaccording to the link status information includes determining, by thecontrol network element according to the link status information, that alink to a storage medium in the first accessible storage network elementis disconnected, and after determining, by the control network elementaccording to the link status information, that a link to a storagemedium in the first accessible storage network element is disconnected,the method further includes sending, by the control network element, alink repair processing request to the first accessible storage networkelement.

Optionally, after determining, by the control network element accordingto the response message, that the at least one storage network elementis an accessible storage network element, the method further includessending, by the control network element, a data read request to theaccessible storage network element using a switching device, where thedata read request includes storage-network-element address informationand to-be-read-data location information, and receiving, by the controlnetwork element, to-be-read data returned by the accessible storagenetwork element according to the data read request.

Optionally, after determining, by the control network element accordingto the response message, that the at least one storage network elementis an accessible storage network element, the method further includessending, by the control network element, a data write request to theaccessible storage network element using a switching device, where thedata write request includes to-be-written data, storage-network-elementaddress information, and to-be-written-data location information, andreceiving, by the control network element, a write success responsereturned by the accessible storage network element according to the datawrite request.

A second aspect of the embodiments of the present disclosure provides astorage network element discovery method, where the method is applied toa storage array, the storage array includes at least one control networkelement and at least one storage network element, each storage networkelement includes at least one storage medium, the storage networkelement is connected to the storage medium using a NVMe interface, andthe method includes receiving, by the storage network element, aheartbeat message broadcast or multicast by the control network element,where the heartbeat message includes address information of the controlnetwork element, and returning, by the storage network element, aresponse message to the control network element according to theheartbeat message such that the control network element determines thatthe storage network element is an accessible storage network element,where the response message includes network parameter information of thestorage network element, where the network parameter informationincludes a network address of the storage network element, and addressinformation of the storage medium in the storage network elementobtained by the storage network element using the NVMe interface.

Optionally, receiving, by the storage network element, a heartbeatmessage broadcast or multicast by the control network element includesreceiving, by the storage network element, the heartbeat messageperiodically broadcast or multicast by the control network element, andreturning, by the storage network element, a response message to thecontrol network element according to the heartbeat message includesperiodically returning, by the storage network element, a responsemessage to the control network element according to the heartbeatmessage.

Returning, by the storage network element, a response message to thecontrol network element according to the heartbeat message includesreturning, by the storage network element to the control network elementaccording to the heartbeat message, a response message that carries linkstatus information such that the control network element determines alink status of the storage network element according to the link statusinformation.

Further, if the link status information indicates that a link to astorage medium in the storage network element is disconnected, afterreturning, by the storage network element, a response message to thecontrol network element according to the heartbeat message, the methodfurther includes receiving, by the storage network element, a linkrepair processing request sent by the control network element, andperforming, by the storage network element, link repair according to thelink repair processing request.

Optionally, after returning, by the storage network element, a responsemessage to the control network element according to the heartbeatmessage, the method further includes receiving, by the storage networkelement, a data read request sent by the control network element using aswitching device, where the data read request includesstorage-network-element address information and to-be-read-data locationinformation, obtaining, by the storage network element, to-be-read dataaccording to the data read request, and returning, by the storagenetwork element, the to-be-read data to the control network elementusing the switching device.

Optionally, after returning, by the storage network element, a responsemessage to the control network element according to the heartbeatmessage, the method further includes receiving, by the storage networkelement, a data write request sent by the control network element usinga switching device, where the data write request includes to-be-writtendata, storage-network-element address information, andto-be-written-data location information, and writing, by the storagenetwork element, the to-be-written data according to the data writerequest, and returning a write success response to the control networkelement.

A third aspect of the embodiments of the present disclosure provides acontrol network element, where the control network element is applied toa storage array, the storage array includes at least one control networkelement and at least one storage network element, each storage networkelement includes at least one storage medium, the storage networkelement is connected to the storage medium using a NVMe interface, andthe control network element includes a sending module configured tobroadcast or multicast a heartbeat message to at least one storagenetwork element, where the heartbeat message includes addressinformation of the control network element, a receiving moduleconfigured to receive a response message returned by at least onestorage network element according to the heartbeat message, and adiscovery module configured to determine, according to the responsemessage, that the at least one storage network element is an accessiblestorage network element, where the response message includes networkparameter information of the corresponding storage network element,where the network parameter information includes network addressinformation of the storage network element and address information ofthe storage medium, where the address information of the storage mediumis obtained by the storage network element using the NVMe interfacebetween the storage network element and the storage medium.

Optionally, the sending module is further configured to periodicallybroadcast or multicast the heartbeat message to the at least one storagenetwork element, and the receiving module is further configured toperiodically receive a response message returned by the at least onestorage network element.

The control network element further includes a first determining moduleconfigured to determine that a link to the first accessible storagenetwork element is disconnected when the receiving module does notreceive, within a preset period of time, a response message returned bya first accessible storage network element, where the first accessiblestorage network element is any storage network element in the at leastone storage network element.

Optionally, if the network parameter information returned by a firstaccessible storage network element includes link status information, thecontrol network element further includes a second determining moduleconfigured to determine a link status of the first accessible storagenetwork element according to the link status information, where thefirst accessible storage network element is any storage network elementin the at least one storage network element.

The second determining module is further configured to determine,according to the link status information, that a link to a storagemedium in the first accessible storage network element is disconnected,and the control network element further includes a repair moduleconfigured to send a link repair processing request to the firstaccessible storage network element.

Optionally, the sending module is further configured to send a data readrequest to the accessible storage network element using a switchingdevice, where the data read request includes storage-network-elementaddress information and to-be-read-data location information, and thereceiving module is further configured to receive to-be-read datareturned by the accessible storage network element according to the dataread request.

Optionally, the sending module is further configured to send a datawrite request to the accessible storage network element using aswitching device, where the data write request includes to-be-writtendata, storage-network-element address information, andto-be-written-data location information, and the receiving module isfurther configured to receive a write success response returned by theaccessible storage network element according to the data write request.

A fourth aspect of the embodiments of the present disclosure provides astorage network element, where the storage network element is applied toa storage array, the storage array includes at least one control networkelement and at least one storage network element, each storage networkelement includes at least one storage medium, the storage networkelement is connected to the storage medium using a NVMe interface, andthe storage network element includes a receiving module configured toreceive a heartbeat message broadcast or multicast by the controlnetwork element, where the heartbeat message includes addressinformation of the control network element, and a sending moduleconfigured to return a response message to the control network elementaccording to the heartbeat message such that the control network elementdetermines that the storage network element is an accessible storagenetwork element, where the response message includes network parameterinformation of the storage network element, where the network parameterinformation includes a network address of the storage network element,and address information of the storage medium in the storage networkelement obtained by the storage network element using the NVMeinterface.

Optionally, the receiving module is further configured to receive theheartbeat message periodically broadcast or multicast by the controlnetwork element, and the sending module is further configured toperiodically return a response message to the control network elementaccording to the heartbeat message.

Optionally, the sending module is further configured to return, to thecontrol network element according to the heartbeat message, a responsemessage that carries link status information such that the controlnetwork element determines a link status of the storage network elementaccording to the link status information.

Further, the storage network element further includes a repairprocessing module, where the receiving module is further configured toreceive a link repair processing request sent by the control networkelement, and the repair processing module is configured to perform linkrepair according to the link repair processing request.

Optionally, the storage network element further includes an obtainingmodule, where the receiving module is further configured to receive adata read request sent by the control network element using a switchingdevice, where the data read request includes storage-network-elementaddress information and to-be-read-data location information, theobtaining module is configured to obtain to-be-read data according tothe data read request, and the sending module is further configured toreturn the to-be-read data to the control network element using theswitching device.

Optionally, the storage network element further includes a write module,where the receiving module is further configured to receive a data writerequest sent by the control network element using a switching device,where the data write request includes to-be-written data,storage-network-element address information, and to-be-written-datalocation information. The write module is configured to write theto-be-written data according to the data write request, and the sendingmodule is further configured to return a write success response to thecontrol network element.

A fifth aspect of the embodiments of the present disclosure provides acontrol network element. The control network element is applied to astorage array. The storage array includes at least one control networkelement and at least one storage network element, each storage networkelement includes at least one storage medium, and the storage networkelement is connected to the storage medium using a NVMe interface. Thecontrol network element includes a processor, a transmitter, a receiver,and a memory. The processor, the transmitter, the receiver, and thememory are connected using a bus. In actual application, the memory, thetransmitter, the receiver, and the processor may not be in a busstructure, and may be in another structure, for example, a starstructure. This is not limited in the embodiments of the presentdisclosure.

The memory is configured to store an instruction. The processor isconfigured to invoke the instruction in the memory to execute thefollowing method.

The processor broadcasts or multicasts a heartbeat message to at leastone storage network element using the transmitter, where the heartbeatmessage includes address information of the control network element.

The processor receives, using the receiver, a response message returnedby at least one storage network element according to the heartbeatmessage, and determines, according to the response message, that the atleast one storage network element is an accessible storage networkelement. The response message includes network parameter information ofthe corresponding storage network element.

The network parameter information includes network address informationof the storage network element and address information of the storagemedium. The address information of the storage medium is obtained by thestorage network element using the NVMe interface between the storagenetwork element and the storage medium.

Optionally, the processor is further configured to periodicallybroadcast or multicast the heartbeat message to the at least one storagenetwork element using the transmitter, and periodically receive, usingthe receiver, a response message returned by the at least one storagenetwork element.

Optionally, if no response message returned by a first accessiblestorage network element is received within a preset period of time, theprocessor determines that a link to the first accessible storage networkelement is disconnected, where the first accessible storage networkelement is any storage network element in the at least one storagenetwork element.

Optionally, if the network parameter information returned by a firstaccessible storage network element includes link status information,after receiving, using the receiver, the response message returned bythe at least one storage network element according to the heartbeatmessage, the processor determines a link status of the first accessiblestorage network element according to the link status information.

The first accessible storage network element is any storage networkelement in the at least one storage network element.

Further, the processor is further configured to determine, according tothe link status information, that a link to a storage medium in thefirst accessible storage network element is disconnected, and afterdetermining that the link to the storage medium in the first accessiblestorage network element is disconnected, the processor sends a linkrepair processing request to the first accessible storage networkelement using the transmitter.

Optionally, after the processor determines, according to the responsemessage, that the at least one storage network element is an accessiblestorage network element, the transmitter sends a data read request tothe accessible storage network element using a switching device. Thedata read request includes storage-network-element address informationand to-be-read-data location information. The processor receives, usingthe receiver, to-be-read data returned by the accessible storage networkelement according to the data read request.

Optionally, after the processor determines, according to the responsemessage, that the at least one storage network element is an accessiblestorage network element, the processor uses the transmitter, and thetransmitter sends a data write request to the accessible storage networkelement using a switching device. The data write request includesto-be-written data, storage-network-element address information, andto-be-written-data location information. The receiver receives a writesuccess response returned by the accessible storage network elementaccording to the data write request.

A sixth aspect of the embodiments of the present disclosure provides astorage network element. The storage network element is applied to astorage array. The storage array includes at least one control networkelement and at least one storage network element, each storage networkelement includes at least one storage medium, and the storage networkelement is connected to the storage medium using a NVMe interface. Thestorage network element includes a processor, a transmitter, a receiver,and a memory. The processor, the transmitter, the receiver, and thememory are connected using a bus. In actual application, the memory, thetransmitter, the receiver, and the processor may not be in a busstructure, and may be in another structure, for example, a starstructure. This is not limited in the embodiments of the presentdisclosure.

The memory is configured to store an instruction. The processor isconfigured to invoke the instruction in the memory to execute thefollowing method.

The processor receives, using the receiver, a heartbeat messagebroadcast or multicast by the control network element. The heartbeatmessage includes address information of the control network element. Theprocessor returns a response message to the control network elementusing the transmitter such that the control network element determinesthat the storage network element is an accessible storage networkelement. The response message includes network parameter information ofthe storage network element.

The network parameter information includes a network address of thestorage network element, and address information of the storage mediumin the storage network element obtained by the storage network elementusing the NVMe interface.

Optionally, the processor receives, using the receiver, the heartbeatmessage periodically broadcast or multicast by the control networkelement, and periodically returns a response message to the controlnetwork element according to the heartbeat message using thetransmitter.

That the processor returns a response message to the control networkelement according to the heartbeat message using the transmitterincludes that the processor returns, to the control network elementaccording to the heartbeat message using the transmitter, a responsemessage that carries link status information such that the controlnetwork element determines a link status of the storage network elementaccording to the link status information.

Further, if the link status information indicates that a link to astorage medium in the storage network element is disconnected, theprocessor receives, using the receiver, a link repair processing requestsent by the control network element, and performs link repair accordingto the link repair processing request.

Optionally, the processor receives, using the receiver, a data readrequest sent by the control network element using a switching device.The data read request includes storage-network-element addressinformation and to-be-read-data location information. Further, theprocessor obtains to-be-read data according to the data read request.The processor uses the transmitter, and the transmitter returns theto-be-read data to the control network element using the switchingdevice.

Optionally, the processor receives, using the receiver, a data writerequest sent by the control network element using a switching device.The data write request includes to-be-written data,storage-network-element address information, and to-be-written-datalocation information. Further, the processor writes the to-be-writtendata according to the data write request. The transmitter returns awrite success response to the control network element using theswitching device.

According to the storage network element discovery method and theapparatus that are provided in the embodiments of the presentdisclosure, a control network element broadcasts or multicasts aheartbeat message to at least one storage network element, receives aresponse message returned by at least one storage network elementaccording to the heartbeat message, and further determines, according tothe response message, that the at least one storage network element isan accessible storage network element. In a NOF storage array, bybroadcasting or multicasting a heartbeat message and according to areply from a storage network element, a control network element maydetermine a storage network element that can be accessed by the controlnetwork element, and know related information of the accessible storagenetwork element according to network parameter information returned bythe accessible storage network element.

BRIEF DESCRIPTION OF DRAWINGS

To describe the technical solutions in the embodiments of the presentdisclosure more clearly, the following briefly describes theaccompanying drawings required for describing the embodiments. Theaccompanying drawings in the following description show some embodimentsof the present disclosure, and persons of ordinary skill in the art maystill derive other drawings from these accompanying drawings withoutcreative efforts.

FIG. 1 is a schematic diagram of an application scenario of a storagenetwork element discovery method according to the present disclosure;

FIG. 2 is a schematic flowchart of Embodiment 1 of a storage networkelement discovery method according to the present disclosure;

FIG. 3 is a schematic flowchart of Embodiment 2 of a storage networkelement discovery method according to the present disclosure;

FIG. 4 is a schematic flowchart of Embodiment 3 of a storage networkelement discovery method according to the present disclosure;

FIG. 5 is a schematic flowchart of Embodiment 4 of a storage networkelement discovery method according to the present disclosure;

FIG. 6 is a schematic structural diagram of Embodiment 1 of a controlnetwork element according to the present disclosure;

FIG. 7 is a schematic structural diagram of Embodiment 2 of a controlnetwork element according to the present disclosure;

FIG. 8 is a schematic structural diagram of Embodiment 3 of a controlnetwork element according to the present disclosure;

FIG. 9 is a schematic structural diagram of Embodiment 4 of a controlnetwork element according to the present disclosure;

FIG. 10 is a schematic structural diagram of Embodiment 1 of a storagenetwork element according to the present disclosure;

FIG. 11 is a schematic structural diagram of Embodiment 2 of a storagenetwork element according to the present disclosure;

FIG. 12 is a schematic structural diagram of Embodiment 3 of a storagenetwork element according to the present disclosure;

FIG. 13 is a schematic structural diagram of Embodiment 4 of a storagenetwork element according to the present disclosure;

FIG. 14 is a schematic structural diagram of Embodiment 5 of a controlnetwork element according to the present disclosure;

FIG. 15 is a schematic structural diagram of Embodiment 5 of a storagenetwork element according to the present disclosure; and

FIG. 16 is an illustration of a payload field of a heartbeat packetaccording to the present disclosure.

DESCRIPTION OF EMBODIMENTS

Embodiments of the present disclosure may be applied to a storage array.The storage array may usually include at least one storage networkelement and at least one control network element. The control networkelement may be a storage controller. Various types of storage softwareor application programs may run on the control network element, forexample, a NOF software program may run on the control network element.Each storage network element may include at least one storage medium.For example, each storage network element may support a storage mediumwith a serial attached small computer system interface (SAS), a storagemedium with an NVMe interface, and may also support a storage mediumsuch as a hard disk drive (HDD) or a solid state drive (SSD). This isnot limited herein.

The storage network element and the control network element may beconnected using a high-speed network such as a fibre channel (FC),INFINIBAND, Ethernet, or PCIe. This is not limited herein.

FIG. 1 is a schematic diagram of an application scenario of a storagenetwork element discovery method according to the present disclosure.FIG. 1 shows a relatively typical topology of a storage array. Thestorage array includes n storage network elements (designated as Stor 1,Stor 2, . . . , and Stor n) and n control network elements (designatedas Host 1, Host 2, . . . , Host n). In consideration of reliability, twomutually redundant switching planes (a straight-line connected switchingplane and a dotted-line connected switching plane in FIG. 1) aredeployed in the storage array in FIG. 1. That is, the storage networkelements and the control network elements are connected using each of aswitch 1 and a switch 2.

In the storage array, the control network elements and the storagenetwork elements are located in an equal network, and therefore there isno definite affiliation relationship between the control networkelements and the storage network elements. According to the methodprovided in the present disclosure, a control network element may learnrelated information of an accessible storage network element after beingpowered on in order to facilitate subsequent control over the storagenetwork element by the control network element and interaction betweenthe control network element and the storage network element.

FIG. 2 is a schematic flowchart of Embodiment 1 of a storage networkelement discovery method according to the present disclosure. As shownin FIG. 2, the method includes the following steps.

Step S201: A control network element broadcasts or multicasts aheartbeat message to at least one storage network element.

Before step S201, the control network element and the storage networkelement are powered on and initialized separately.

After initialization is completed, the control network elementestablishes a logical network interface, for example, an Ethernetinterface in order to obtain address information of the control networkelement. The address information may be a Media Access Control (MAC)address.

The heartbeat message may include the address information, such as a MACaddress, of the control network element. However, the heartbeat messageis not limited thereto, and may further include another message such asa packet type. For example, the heartbeat message is sent using aheartbeat packet, and may carry type information of the heartbeat packetsuch as an “Ethernet” packet. This is not limited herein.

The control network element may choose to send the heartbeat message ina broadcast or multicast manner. This is not limited herein. If theheartbeat message is sent in a multicast manner, the heartbeat messagemay carry address information of multiple storage network elements orthe like, that is, may be sent to multiple corresponding storage networkelements.

Step S202: A storage network element returns a response message if thestorage network element receives the broadcast or multicast heartbeatmessage.

The storage network element herein may be any storage network element inthe foregoing storage array.

Step S203: The control network element receives a response messagereturned by at least one storage network element according to theheartbeat message, and determines, according to the response message,that the at least one storage network element is an accessible storagenetwork element.

The response message may include network parameter information of thecorresponding storage network element. The network parameter informationmay include network address information of the storage network elementand address information of a storage medium. The address information ofthe storage medium may be address information of at least one storagemedium in the storage network element that returns the response message.Specific content of the network parameter information is not limitedherein, and may be flexibly configured according to a specificrequirement and scenario. For example, if the present disclosure isextended to another type of network, the network parameter informationmay further include type information of the storage network element orthe like, or may further include a namespace of the storage medium orthe like. The namespace may be a partition in the storage medium.

After the control network element broadcasts or multicasts the heartbeatmessage, a storage network element receiving the heartbeat message makesa reply. These storage network elements making a reply are storagenetwork elements that can be accessed by the control network element. Inthis way, the control network element may determine, according toreceived response messages, a quantity of storage network elements thatcan be accessed by the control network element and related networkinformation of these accessible storage network elements, and furtherlearn information such as a topology of the storage array. Subsequently,the control network element may perform an operation such as dataread/write on these accessible storage network elements.

In this embodiment, a control network element broadcasts or multicasts aheartbeat message to at least one storage network element, receives aresponse message returned by at least one storage network elementaccording to the heartbeat message, and further determines, according tothe response message, that the at least one storage network element isan accessible storage network element. In a NOF storage array, bybroadcasting or multicasting a heartbeat message and according to areply from a storage network element, a control network element maydetermine a storage network element that can be accessed by the controlnetwork element, and know related information of the accessible storagenetwork element according to network parameter information returned bythe accessible storage network element.

FIG. 3 is a schematic flowchart of Embodiment 2 of a storage networkelement discovery method according to the present disclosure. In FIG. 3,one of the foregoing at least one storage network element is used as anexample to describe the method executed by the storage network element.The storage network element may be any one of the foregoing at least onestorage network element. As shown in FIG. 3, the method includes thefollowing steps.

Step S301: The storage network element receives a heartbeat messagebroadcast or multicast by the control network element.

The heartbeat message includes address information of the controlnetwork element. As described in the foregoing embodiment, the addressinformation may be a MAC address. This is not limited herein.

Step S302: The storage network element returns a response message to thecontrol network element according to the heartbeat message such that thecontrol network element determines that the storage network element isan accessible storage network element.

The response message may include network parameter information of thestorage network element.

Further, after being powered on separately, the storage network elementmay collect the network parameter information of the storage networkelement. Specific collection may be completed by software or hardware ona storage network element side. For example, collection may be performedby an application-specific integrated circuit (ASIC). This is notlimited herein.

In a NOF storage array, the storage network element and a storage mediumin the storage network element are connected using an NVMe interface. Ina process of collecting the network parameter information, the storagenetwork element obtains address information of each storage medium usingan NVMe interface between the storage network element and the storagemedium.

Further, after the heartbeat message broadcast or multicast by thecontrol network element is received, the network parameter informationmay be carried in the response message and returned to the controlnetwork element such that the control network element knows the relatednetwork parameter information of the accessible storage network element.The storage network element always maintains the network parameterinformation.

In this embodiment, a storage network element replies to a controlnetwork element according to a heartbeat message broadcast or multicastby the control network element such that the control network element maylearn a storage network element that can be accessed by the controlnetwork element, and further learn a storage array.

Optionally, that the control network element broadcasts or multicasts aheartbeat message may be that the control network element periodicallybroadcasts or multicasts the heartbeat message.

Correspondingly, that the storage network element returns a responsemessage to the control network element according to the heartbeatmessage may be that the storage network element periodically returns aresponse message to the control network element according to theheartbeat message.

That is, the control network element periodically receives a responsemessage returned by the foregoing at least one storage network element.

A period is not limited herein, and may be flexibly set according to aspecific requirement.

Further, after the control network element receives the response messagereturned by the at least one storage network element according to theheartbeat message, if the control network element does not receive,within a preset period of time, a response message returned by a firstaccessible storage network element, the control network elementdetermines that a link to the first accessible storage network elementis disconnected. The first accessible storage network element is anystorage network element in the at least one storage network element.

The first accessible storage network element has always normallyreturned the foregoing response message to the control network elementwhen the control network element periodically broadcasts or multicasts aheartbeat packet. However, if the control network element does notreceive, in a period, a response message returned by the firstaccessible storage network element, the control network elementconsiders that the link to the first accessible storage network elementis disconnected. Usually, the link may be broken, a hot swap may occur,or the like. This is not limited herein.

The network parameter information may further include link statusinformation used to indicate link status information of the storagenetwork element. For example, a flag field is added to the networkparameter information to indicate whether a link status changes.

Optionally, the link status information indicates a link status of astorage medium in the storage network element.

In another implementation manner, if network parameter informationreturned by a first accessible storage network element includes linkstatus information, after the control network element receives theresponse message returned by the at least one storage network elementaccording to the heartbeat message, the control network element maydetermine a link status of the first accessible storage network elementaccording to the link status information. For example, if the linkstatus information indicates that a link status changes, the controlnetwork element may learn, according to the link status information,that the link status changes. In this case, the control network elementusually considers that a link or links to one or more storage media inthe storage network element is or are disconnected. For example, a hotswap occurs. However, this is not limited thereto.

The storage network element monitors a link status after being poweredon separately, that is, determines whether link status changeinformation sent by an internal storage medium is received. If the linkstatus change information is received, the storage network elementupdates the network parameter information maintained by the storagenetwork element, and indicates, in the network parameter information,that the link status changes. After the heartbeat message broadcast ormulticast by the control network element is received next time, aresponse message indicating that the link status changes is returned.

In this embodiment of the present disclosure, a control network elementmay discover, by broadcasting or multicasting a heartbeat packet, astorage network element that can be accessed by the control networkelement, further determine a storage topology of the control networkelement, and may further subsequently determine a link status, otherfault information, or the like according to a response message returnedby the storage network element.

Based on the foregoing embodiment, that the control network elementdetermines a link status of the first accessible storage network elementaccording to the link status information includes that the controlnetwork element determines, according to the link status information,that a link to a storage medium in the first accessible storage networkelement is disconnected. The control network element may further performlink repair. Optionally, after the control network element determines,according to the link status information, that the link to the storagemedium in the first accessible storage network element is disconnected,the control network element sends a link repair processing request tothe first accessible storage network element. After receiving the linkrepair processing request, the storage network element may perform linkrepair according to the link repair processing request.

Further, the storage network element may perform link repair accordingto an actual status of link disconnection, for example, perform linkreconstruction or link migration. This is not limited herein.

In the foregoing embodiment, the control network element learns storagenetwork elements that can be accessed by the control network element,and may subsequently perform an operation such as data read/write onthese accessible storage network elements.

In a data read process, the control network element sends a data readrequest to an accessible storage network element using a switchingdevice. The data read request includes storage-network-element addressinformation, to-be-read-data location information, and the like. Afterreceiving the data read request, the storage network element obtainsto-be-read data according to the data read request, and returns theto-be-read data to the control network element using the switchingdevice.

FIG. 4 is a schematic flowchart of Embodiment 3 of a storage networkelement discovery method according to the present disclosure. As shownin FIG. 4, the method includes the following steps.

Step S401: A control network element broadcasts or multicasts aheartbeat message to at least one storage network element.

Step S402: A storage network element returns a response message if thestorage network element receives the broadcast or multicast heartbeatmessage.

Step S403: The control network element receives a response messagereturned by at least one storage network element according to theheartbeat message, and determines, according to the response message,that the at least one storage network element is an accessible storagenetwork element.

Step S404: The control network element sends a data read request to aswitching device, where the data read request includesstorage-network-element address information and to-be-read-data locationinformation.

Further, the control network element may invoke a NOF software programof the control network element and send the data read request using aNOF logical interface.

The to-be-read-data location information may be further indicated byinformation such as a logical block address (LBA), a length (LEN), anamespace identifier (NSID), or a scatter gather list (SGL) carried inthe data read request. The to-be-read-data location information refersto a specific location, for storing data, in a storage medium, forexample, information such as a starting bit.

Step S405: The switching device forwards the data read request to acorresponding storage network element according to thestorage-network-element address information in the data read request.

Step S406: After receiving the data read request, the storage networkelement parses the to-be-read-data location information in the data readrequest, and obtains corresponding to-be-read data according to theto-be-read-data location information.

That is, the storage network element determines, according to theto-be-read-data location information, specific locations for storing thedata, then obtains, by invoking an NVMe interface, the data stored inthese locations, and returns the data to the control network element.

Step S407: The storage network element sends a data return message tothe switching device, where the data return message includes theto-be-read data and address information of the control network element.

Step S408: The switching device sends the data return message to thecontrol network element according to the address information of thecontrol network element.

Likewise, in a data write process, the control network element sends adata write request to the accessible storage network element using aswitching device. The data write request includes to-be-written data,storage-network-element address information, and to-be-written-datalocation information. The storage network element receives the datawrite request, and writes the to-be-written data according to the datawrite request. After data write is completed, the storage networkelement returns a write success response to the control network elementsuch that the control network element knows that the data issuccessfully written.

FIG. 5 is a schematic flowchart of Embodiment 4 of a storage networkelement discovery method according to the present disclosure. As shownin FIG. 5, the method includes the following steps.

Step S501: A control network element broadcasts or multicasts aheartbeat message to at least one storage network element.

Step S502: A storage network element returns a response message if thestorage network element receives the broadcast or multicast heartbeatmessage.

Step S503; The control network element receives a response messagereturned by at least one storage network element according to theheartbeat message, and determines, according to the response message,that the at least one storage network element is an accessible storagenetwork element.

Step S504: The control network element sends a data write request to aswitching device, where the data write request includes to-be-writtendata, storage-network-element address information, andto-be-written-data location information.

Further, the control network element may invoke a NOF software programof the control network element and send the data write request using aNOF logical interface.

The to-be-written-data location information may be indicated usinginformation such as an LBA, an LEN, an NSID, or an SGL. Theto-be-written-data location information further refers to a specificlocation, for storing data, in a storage medium, for example,information such as a starting bit.

Step S505: The switching device forwards the data write request to acorresponding storage network element according to thestorage-network-element address information in the data write request.

Step S506: After receiving the data write request, the storage networkelement parses the to-be-written-data location information in the datawrite request, and writes the to-be-written data into a correspondinglocation.

The storage network element only needs to determine the correspondinglocation according to the to-be-written-data location information, andwrite the to-be-written data.

Step S507: The storage network element sends a write success response tothe switching device, where the write success response carries addressinformation of the control network element.

Step S508: The switching device forwards the write success response tothe control network element according to the address information of thecontrol network element such that the control network element knows thatthe data is successfully written.

Further, both the heartbeat message and the response message may use apacket structure shown in Table 1. However, this is not limited thereto.As shown in Table 1:

TABLE 1 Field Index 63:56 55:48 47:32 31:8 7:0 q-0 Source addressDestination address q-1 Control information tag 802.1 Q tag Sourceaddress type q-2 Reserved bits Physical link Tag Packet type ID q-3Address of a storage medium q-4 Payload . . . q-n

In a case of the heartbeat message, in Table 1, the source address inline “q-0” is an address of the control network element, and thedestination address is an address of the storage network element. In acase of the response message, the source address in line “q-0” is anaddress of the storage network element, and the destination address isan address of the control network element. The source address in line“q-1” may be the same as the source address in line “q-0”.

The “Packet type” field in “q-2” may be used to distinguish between theheartbeat message and the response message. The control network elementdiscards the packet when the “packet type” indicates that the packet isthe heartbeat message, if the control network element receives thepacket, and determines that the packet is the heartbeat message. If thestorage network element receives the heartbeat message, the storagenetwork element makes a response, that is, returns the foregoingresponse message.

When the “Packet type” indicates that the packet is the responsemessage, if the control network element receives the packet, anddetermines that the packet is the response message, the control networkelement parses the packet, and obtains the network parameter informationadded to the response message by the storage network element.

The “Physical link ID” is an identity of a physical link between acontrol network element and a storage network element.

Content of the “Payload” field in “q-4” to “q-n” of the heartbeatmessage is different from that of the response message. Table 2 shows a“Payload” field of a heartbeat packet. However, this is not limitedthereto.

TABLE 2 Byte 1 Byte 0 Byte 3 Byte 2 15 14 13 12 11 10 9 8 7 6 5 4 3 2 10 0 Reserved Reserved Packet type 1 Reserved 2 Reserved 3 Reserved 4Reserved . . . Reserved 15 Reserved

Each byte includes eight bits.

Table 3 in FIG. 16 shows a “Payload” field of a heartbeat packet.However, this is not limited thereto.

The “Address family” in Table 3 may indicate a transmission type. Thetransmission address in lines 5 to 8 is an address matching thetransmission type. For example, the transmission type is InternetProtocol (IP) version 4 (IPv4), and the transmission address is an IPv4address. This is not limited herein.

A value of “V” in “V=1” in Table 3 indicates packet validity. A value of“BC” in “BC=2” indicates a broadcast type. Certainly, if a multicastmanner is used, the field may be used to fill a multicast type. This isnot limited herein. A value of “OPC” in “OPC=0x060” indicates a value ofoperate code. A value of “HTAG” in “HTAG=0” is a command tag of thecontrol network element. The value of “HTAG” is used to distinguish eachcommand.

FIG. 6 is a schematic structural diagram of Embodiment 1 of a controlnetwork element according to the present disclosure. The control networkelement is the control network element in the foregoing embodiments, andis applied to a storage array. As shown in FIG. 6, the control networkelement may include a sending module 601, a receiving module 602, and adiscovery module 603.

The sending module 601 is configured to broadcast or multicast aheartbeat message to at least one storage network element. The heartbeatmessage includes address information of the control network element.

The receiving module 602 is configured to receive a response messagereturned by at least one storage network element according to theheartbeat message.

The discovery module 603 is configured to determine, according to theresponse message, that the at least one storage network element is anaccessible storage network element. The response message includesnetwork parameter information of the corresponding storage networkelement.

The network parameter information includes network address informationof the storage network element and address information of the storagemedium. The address information of the storage medium is obtained by thestorage network element using an NVMe interface between the storagenetwork element and the storage medium.

Optionally, the sending module 601 periodically broadcasts or multicaststhe heartbeat message to the at least one storage network element.

Correspondingly, the receiving module 602 periodically receives aresponse message returned by the at least one storage network element.

FIG. 7 is a schematic structural diagram of Embodiment 2 of a controlnetwork element according to the present disclosure. As shown in FIG. 7,based on FIG. 6, the control network element may further include a firstdetermining module 701 configured to determine that a link to the firstaccessible storage network element is disconnected when the receivingmodule 602 does not receive, within a preset period of time, a responsemessage returned by a first accessible storage network element.

The first accessible storage network element is any storage networkelement in the at least one storage network element.

Optionally, the network parameter information returned by the firstaccessible storage network element may further include link statusinformation.

FIG. 8 is a schematic structural diagram of Embodiment 3 of a controlnetwork element according to the present disclosure. As shown in FIG. 8,based on FIG. 6, the control network element may further include asecond determining module 801 configured to determine a link status ofthe first accessible storage network element according to the linkstatus information.

The first accessible storage network element is any storage networkelement in the at least one storage network element.

FIG. 9 is a schematic structural diagram of Embodiment 4 of a controlnetwork element according to the present disclosure. As shown in FIG. 9,based on FIG. 8, the control network element may further include arepair module 901.

Further, the second determining module 801 may determine, according tothe link status information, that a link to a storage medium in thefirst accessible storage network element is disconnected.

The repair module 901 is configured to send a link repair processingrequest to the first accessible storage network element.

Further, the link repair processing request may be sent by a sendingapparatus such as a transmitter in a memory.

Optionally, in an implementation manner, after it is determined,according to the response message, that the at least one storage networkelement is an accessible storage network element, the sending module 601may further send a data read request to the accessible storage networkelement using a switching device. The data read request includesstorage-network-element address information and to-be-read-data locationinformation.

The receiving module 602 may further receive to-be-read data returned bythe accessible storage network element according to the data readrequest.

Optionally, in another implementation manner, the sending module 601 maybe further configured to send a data write request to the accessiblestorage network element using a switching device. The data write requestincludes to-be-written data, storage-network-element addressinformation, and to-be-written-data location information.

The receiving module 602 may further receive a write success responsereturned by the accessible storage network element according to the datawrite request.

For an implementation principle and a technical effect of the controlnetwork element, refer to the foregoing method embodiments. Details arenot described herein again.

FIG. 10 is a schematic structural diagram of Embodiment 1 of a storagenetwork element according to the present disclosure. The storage networkelement is the storage network element in the foregoing embodiments, andmay be any storage network element in a storage array. As shown in FIG.10, the storage network element includes a receiving module 110 and asending module 111.

The receiving module 110 is configured to receive a heartbeat messagebroadcast or multicast by the control network element. The heartbeatmessage includes address information of the control network element.

The sending module 111 is configured to return a response message to thecontrol network element according to the heartbeat message such that thecontrol network element determines that the storage network element isan accessible storage network element. The response message includesnetwork parameter information of the storage network element.

The network parameter information includes a network address of thestorage network element, and address information of the storage mediumin the storage network element that is obtained by the storage networkelement using an NVMe interface.

Optionally, the receiving module 110 is further configured to receivethe heartbeat message periodically broadcast or multicast by the controlnetwork element.

Correspondingly, the sending module 111 is further configured toperiodically return a response message to the control network elementaccording to the heartbeat message.

Optionally, the sending module 111 is further configured to return, tothe control network element according to the heartbeat message, aresponse message that carries link status information such that thecontrol network element determines a link status of the storage networkelement according to the link status information.

FIG. 11 is a schematic structural diagram of Embodiment 2 of a storagenetwork element according to the present disclosure. Based on FIG. 10,the storage network element may further include a repair processingmodule 112.

Further, the receiving module 110 may receive a link repair processingrequest sent by the control network element.

The repair processing module 112 performs link repair according to thelink repair processing request.

FIG. 12 is a schematic structural diagram of Embodiment 3 of a storagenetwork element according to the present disclosure. Based on FIG. 10,the storage network element may further include an obtaining module 120.

The receiving module 110 is further configured to receive a data readrequest sent by the control network element using a switching device.The data read request includes storage-network-element addressinformation and to-be-read-data location information.

The obtaining module 120 is configured to obtain to-be-read dataaccording to the data read request.

The sending module 111 is further configured to return the to-be-readdata to the control network element using the switching device.

FIG. 13 is a schematic structural diagram of Embodiment 4 of a storagenetwork element according to the present disclosure. Based on FIG. 10,the storage network element may further include a write module 130.

The receiving module 110 is configured to receive a data write requestthat is sent by the control network element using a switching device.The data write request includes to-be-written data,storage-network-element address information, and to-be-written-datalocation information.

The write module 130 is configured to write the to-be-written dataaccording to the data write request.

The sending module 111 is configured to return a write success responseto the control network element.

For an implementation principle and a technical effect of the storagenetwork element, refer to the foregoing method embodiments. Details arenot described herein again.

FIG. 14 is a schematic structural diagram of Embodiment 5 of a controlnetwork element according to the present disclosure. As shown in FIG.14, the control network element includes a processor 141, a transmitter142, a receiver 143, and a memory 144. The processor 141, thetransmitter 142, the receiver 143, and the memory 144 are connectedusing a bus 145.

In actual application, the processor 141, the transmitter 142, thereceiver 143, and the memory 144 may not be in a bus structure, and maybe in another structure, for example, a star structure. This is notlimited in this embodiment of the present disclosure.

The memory 144 is configured to store an instruction. The processor 141is configured to invoke the instruction in the memory 144 to execute thefollowing method.

The processor 141 broadcasts or multicasts a heartbeat message to atleast one storage network element using the transmitter 142. Theheartbeat message includes address information of the control networkelement.

The processor 141 receives, using the receiver 143, a response messagereturned by at least one storage network element according to theheartbeat message, and determines, according to the response message,that the at least one storage network element is an accessible storagenetwork element. The response message includes network parameterinformation of the corresponding storage network element.

The network parameter information includes network address informationof the storage network element and address information of the storagemedium. The address information of the storage medium is obtained by thestorage network element using an NVMe interface between the storagenetwork element and the storage medium.

In this embodiment, a control network element broadcasts or multicasts aheartbeat message to at least one storage network element, receives aresponse message returned by at least one storage network elementaccording to the heartbeat message, and further determines, according tothe response message, that the at least one storage network element isan accessible storage network element. In a NOF storage array, bybroadcasting or multicasting a heartbeat message and according to areply from a storage network element, a control network element maydetermine a storage network element that can be accessed by the controlnetwork element, and know related information of the accessible storagenetwork element according to network parameter information returned bythe accessible storage network element.

Optionally, the processor 141 is further configured to periodicallybroadcast or multicast the heartbeat message to the at least one storagenetwork element using the transmitter 142, and periodically receive,using the receiver 143, a response message returned by the at least onestorage network element.

Optionally, if the processor 141 does not receive, within a presetperiod of time, a response message returned by a first accessiblestorage network element, the processor 141 determines that a link to thefirst accessible storage network element is disconnected. The firstaccessible storage network element is any storage network element in theat least one storage network element.

Optionally, if the network parameter information returned by a firstaccessible storage network element includes link status information,after receiving, using the receiver 143, the response message returnedby the at least one storage network element according to the heartbeatmessage, the processor 141 determines a link status of the firstaccessible storage network element according to the link statusinformation.

The first accessible storage network element is any storage networkelement in the at least one storage network element.

The processor 141 is further configured to determine, according to thelink status information, that a link to a storage medium in the firstaccessible storage network element is disconnected.

Correspondingly, after determining that the link to the storage mediumin the first accessible storage network element is disconnected, theprocessor 141 sends a link repair processing request to the firstaccessible storage network element using the transmitter.

Optionally, after the processor 141 determines, according to theresponse message, that the at least one storage network element is anaccessible storage network element, the processor 141 uses thetransmitter 142, and the transmitter 142 sends a data read request tothe accessible storage network element using a switching device. Thedata read request includes storage-network-element address informationand to-be-read-data location information. The processor 141 receives,using the receiver 143, to-be-read data returned by the accessiblestorage network element according to the data read request.

Optionally, after the processor 141 determines, according to theresponse message, that the at least one storage network element is anaccessible storage network element, the processor 141 uses thetransmitter 142, and the transmitter 142 sends a data write request tothe accessible storage network element using a switching device. Thedata write request includes to-be-written data, storage-network-elementaddress information, and to-be-written-data location information. Thereceiver 143 receives a write success response returned by theaccessible storage network element according to the data write request.

FIG. 15 is a schematic structural diagram of Embodiment 5 of a storagenetwork element according to the present disclosure. As shown in FIG.15, the storage network element includes a processor 151, a transmitter152, a receiver 153, and a memory 154. The processor 151, thetransmitter 152, the receiver 153, and the memory 154 are connectedusing a bus 155.

In actual application, the processor 151, the transmitter 152, thereceiver 153, and the memory 154 may not be in a bus structure, and maybe in another structure, for example, a star structure. This is notlimited in this embodiment of the present disclosure.

The memory 154 is configured to store an instruction. The processor 151is configured to invoke the instruction in the memory 154 to execute thefollowing method.

The processor 151 receives, using the receiver 153, a heartbeat messagebroadcast or multicast by the control network element. The heartbeatmessage includes address information of the control network element. Theprocessor 151 returns a response message to the control network elementusing the transmitter 152 such that the control network elementdetermines that the storage network element is an accessible storagenetwork element. The response message includes network parameterinformation of the storage network element.

The network parameter information includes a network address of thestorage network element, and address information of the storage mediumin the storage network element that is obtained by the storage networkelement using an NVMe interface.

Optionally, the processor 151 receives, using the receiver 153, theheartbeat message periodically broadcast or multicast by the controlnetwork element, and periodically returns a response message to thecontrol network element according to the heartbeat message using thetransmitter 152.

That the processor 151 returns a response message to the control networkelement according to the heartbeat message using the transmitterincludes that the processor 151 returns, to the control network elementaccording to the heartbeat message using the transmitter 152, a responsemessage that carries link status information such that the controlnetwork element determines a link status of the storage network elementaccording to the link status information.

Further, if the link status information indicates that a link to astorage medium in the storage network element is disconnected, theprocessor 151 receives, using the receiver 153, a link repair processingrequest sent by the control network element, and performs link repairaccording to the link repair processing request.

Optionally, the processor 151 receives, using the receiver 153, a dataread request sent by the control network element using a switchingdevice. The data read request includes storage-network-element addressinformation and to-be-read-data location information. Further, theprocessor 151 obtains to-be-read data according to the data readrequest. The processor 151 uses the transmitter 152, and the transmitter152 returns the to-be-read data to the control network element using theswitching device.

Optionally, the processor 151 receives, using the receiver 153, a datawrite request sent by the control network element using a switchingdevice. The data write request includes to-be-written data,storage-network-element address information, and to-be-written-datalocation information. Further, the processor 151 writes theto-be-written data according to the data write request, and thetransmitter 152 returns a write success response to the control networkelement using the switching device.

Persons of ordinary skill in the art may understand that all or some ofthe steps of the method embodiments may be implemented by instructingrelated hardware by a program. The program may be stored in a computerreadable storage medium. The steps of the method embodiments areperformed when the program runs. The foregoing storage medium includesany medium that can store program code, such as a read-only memory(ROM), a random access memory (RAM), a magnetic disk, or an opticaldisc.

Finally, it should be noted that the foregoing embodiments are merelyintended for describing the technical solutions of the presentdisclosure, but not for limiting the present disclosure. Although thepresent disclosure is described in detail with reference to theforegoing embodiments, persons of ordinary skill in the art shouldunderstand that they may still make modifications to the technicalsolutions described in the foregoing embodiments or make equivalentreplacements to some or all technical features thereof, withoutdeparting from the scope of the technical solutions of the embodimentsof the present disclosure.

What is claimed is:
 1. A storage network element discovery method,applied to a control network element, wherein the control networkelement is in communication with at least one storage network element,wherein each storage network element comprises at least one storagemedium, wherein the at least one storage network element is coupled tothe at least one storage medium using a Nonvolatile Memory express(NVMe) interface, and wherein the storage network element discoverymethod comprises: broadcasting or multicasting, by the control networkelement, a heartbeat message to the at least one storage networkelement, wherein the heartbeat message comprises address information ofthe control network element; receiving, by the control network element,a response message returned by the at least one storage network elementaccording to the heartbeat message; determining, according to theresponse message, that the at least one storage network element is anaccessible storage network element, wherein the response messagecomprises network parameter information of the corresponding storagenetwork element, wherein the network parameter information comprisesnetwork address information of the corresponding storage network elementand address information of the at least one storage medium, wherein theaddress information of the at least one storage medium is obtained bythe corresponding storage network element using the NVMe interfacebetween the corresponding storage network element and the at least onestorage medium, and wherein the network parameter information returnedby the accessible storage network element comprises link statusinformation; determining, by the control network element, a link statusof the accessible storage network element according to the link statusinformation after receiving the response message returned by the atleast one storage network element, wherein the link status of theaccessible storage network element is determined by determining, by thecontrol network element according to the link status information, that alink to the accessible storage network element is decoupled; andsending, by the control network element, a link repair processingrequest to the accessible storage network element after determining thatthe link to the storage medium in the storage network element isdecoupled.
 2. The storage network element discovery method of claim 1,wherein after receiving the response message returned by the at leastone storage network element according to the heartbeat message, themethod further comprises determining, by the control network element,that a link to a first accessible storage network element is decoupledwhen the control network element does not receive, within a presetperiod of time, a response message returned by the first accessiblestorage network element, wherein the first accessible storage networkelement is any storage network element in the at least one storagenetwork element.
 3. The storage network element discovery method ofclaim 1, wherein after determining that the at least one storage networkelement is the accessible storage network element, the storage networkelement discovery method further comprises: sending, by the controlnetwork element, a data read request to the accessible storage networkelement using a switching device, wherein the data read requestcomprises storage-network-element address information andto-be-read-data location information; and receiving, by the controlnetwork element, to-be-read data returned by the accessible storagenetwork element according to the data read request.
 4. The storagenetwork element discovery method of claim 1, wherein after determiningthat the at least one storage network element is the accessible storagenetwork element, the storage network element discovery method furthercomprises: sending, by the control network element, a data write requestto the accessible storage network element using a switching device,wherein the data write request comprises to-be-written data,storage-network-element address information, and to-be-written-datalocation information; and receiving, by the control network element, awrite success response returned by the accessible storage networkelement according to the data write request.
 5. A storage networkelement discovery method, applied to a storage network element, whereinthe storage network element is in communication with at least onecontrol network element, wherein the storage network element comprisesat least one storage medium, wherein the storage network element iscoupled to the at least one storage medium using a Nonvolatile MemoryExpress (NVMe) interface, and wherein the storage network elementdiscovery method comprises: receiving, by the storage network element, aheartbeat message broadcast or multicast by the at least one controlnetwork element, wherein the heartbeat message comprises addressinformation of the at least one control network element; returning, bythe storage network element, a response message to the at least onecontrol network element according to the heartbeat message such that theat least one control network element determines that the storage networkelement is an accessible storage network element, wherein the responsemessage comprises network parameter information of the storage networkelement, wherein the network parameter information comprises a networkaddress of the storage network element and address information of the atleast one storage medium in the storage network element obtained by thestorage network element using the NVMe interface, wherein the responsemessage is returned to the at least one control network element byreturning, by the storage element to the at least one control networkelement according to the heartbeat message, a response message thatcarries link status information such that the at least one controlnetwork element determines a link status of the storage network elementaccording to the link status information, and wherein the link statusinformation indicates that a link to a storage medium in the storagenetwork element is decoupled; receiving, by the storage network element,a link repair processing request from the at least one control networkelement after returning the response message to the at least one controlnetwork element according to the heartbeat message; and performing, bythe storage network element, link repair according to the link repairprocessing request.
 6. The storage network element discovery method ofclaim 5, wherein after returning the response message, the storagenetwork element discovery method further comprises: receiving, by thestorage network element, a data read request from the at least onecontrol network element using a switching device, wherein the data readrequest comprises storage-network-element address information andto-be-read-data location information; obtaining, by the storage networkelement, to-be-read data according to the data read request; andreturning, by the storage network element, the to-be-read data to the atleast one control network element using the switching device.
 7. Thestorage network element discovery method of claim 5, wherein afterreturning the response message, the storage network element discoverymethod further comprises: receiving, by the storage network element, adata write request from the at least one control network element using aswitching device, wherein the data write request comprises to-be-writtendata, storage-network-element address information, andto-be-written-data location information; writing, by the storage networkelement, the to-be-written data according to the data write request; andreturning a write success response to the at least one control networkelement.
 8. A control network element, wherein the control networkelement is in communication with at least one storage network element,wherein each storage network element comprises at least one storagemedium, wherein the at least one storage network element is coupled tothe at least one storage medium using a Nonvolatile Memory Express(NVMe) interface, and wherein the control network element comprises: amemory comprising instructions; and a processor coupled to the memory,wherein the instructions cause the processor to be configured to:broadcast or multicast a heartbeat message to the at least one storagenetwork element, wherein the heartbeat message comprises addressinformation of the control network element; receive a response messagereturned by the at least one storage network element according to theheartbeat message; determine, according to the response message, thatthe at least one storage network element is an accessible storagenetwork element, wherein the response message comprises networkparameter information of the corresponding storage network element,wherein the network parameter information comprises network addressinformation of the corresponding storage network element and addressinformation of the at least one storage medium, wherein the addressinformation of the at least one storage medium is obtained by thecorresponding storage network element using the NVMe interface betweenthe corresponding storage network element and the at least one storagemedium, and wherein the network parameter information returned by theaccessible storage network element comprises link status information;determine a link status of the accessible storage network elementaccording to the link status information, wherein the accessible storagenetwork element is any storage network element in the at least onestorage network element; determine, according to the link statusinformation, that a link to a storage medium in the accessible storagenetwork element is decoupled; and send a link repair processing requestto the accessible storage network element.
 9. The control networkelement of claim 8, wherein the instructions further cause the processorto be configured to determine that a link to a first accessible storagenetwork element is decoupled when the control network element does notreceive, within a preset period of time, a response message returned bythe first accessible storage network element, and wherein the firstaccessible storage network element is any storage network element in theat least one storage network element.
 10. The control network element ofclaim 8, wherein the instructions further cause the processor to beconfigured to: send a data read request to the accessible storagenetwork element using a switching device, wherein the data read requestcomprises storage-network-element address information andto-be-read-data location information; and receive to-be-read datareturned by the accessible storage network element according to the dataread request.
 11. The control network element of claim 8, wherein theinstructions further cause the processor to be configured to: send adata write request to the accessible storage network element using aswitching device, wherein the data write request comprises to-be-writtendata, storage-network-element address information, andto-be-written-data location information; and receive a write successresponse returned by the accessible storage network element according tothe data write request.
 12. A storage network element, wherein thestorage network element is in communication with at least one controlnetwork element, wherein the storage network element comprises at leastone storage medium, wherein the storage network element is coupled tothe at least one storage medium using a Nonvolatile Memory Express(NVMe) interface, and wherein the storage network element comprises: amemory comprising instructions; and a processor coupled to the memory,wherein the instructions cause the processor to be configured to:receive a heartbeat message broadcast or multicast by the at least onecontrol network element, wherein the heartbeat message comprises addressinformation of the at least one control network element; return aresponse message to the at least one control network element accordingto the heartbeat message such that the at least one control networkelement determines that the storage network element is an accessiblestorage network element, wherein the response message comprises networkparameter information of the storage network element, and wherein thenetwork parameter information comprises a network address of the storagenetwork element, and address information of the at least one storagemedium in the storage network element obtained by the storage networkelement using the NVMe interface; return, to the at least one controlnetwork element according to the heartbeat message, a response messagethat carries link status information such that the at least one controlnetwork element determines a link status of the storage network elementaccording to the link status information; receive a link repairprocessing request from the at least one control network element; andperform link repair according to the link repair processing request. 13.The storage network element of claim 12, wherein the instructionsfurther cause the processor to be configured to: receive a data readrequest from the at least one control network element using a switchingdevice, wherein the data read request comprises storage-network-elementaddress information and to-be-read-data location information; obtainto-be-read data according to the data read request; and return theto-be-read data to the at least one control network element using theswitching device.
 14. The storage network element of claim 12, whereinthe instructions further cause the processor to be configured to:receive a data write request from the at least one control networkelement using a switching device, wherein the data write requestcomprises to-be-written data, storage-network-element addressinformation, and to-be-written-data location information; write theto-be-written data according to the data write request; and return awrite success response to the at least one control network element.